
from rest_framework.pagination import PageNumberPagination


class MyPagination(PageNumberPagination):
    "自定义分页器类"
    page_size = 5  # 每页数量
    max_page_size = 10  # 每页最大的数量
    page_size_query_param = 'pagesize'  # 每页数量的参数名
    page_query_param = 'page'  # 页码的参数名



